﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinFormsApp1.MVC.Model;

namespace WinFormsApp1.MVP.Presenter
{
	public class PersonPresenter
	{
		private readonly IPersonView _view;

		public PersonPresenter(IPersonView view)
		{
			_view = view;
		}

		public void Submit()
		{
			var person = new Person
			{
				Name = _view.PersonName,
				Age = _view.Age
			};

			// 这里可以添加更多逻辑，例如验证、保存数据等
			_view.ShowMessage($"Created: {person.Name}, Age: {person.Age}");
		}
	}

}
